* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toolbar-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #3f51b5;
  color: white;
}

.btn-primary:hover {
  background: #303f9f;
}

.btn-outline {
  background: transparent;
  border: 1px solid #3f51b5;
  color: #3f51b5;
}

.btn-outline:hover {
  background: #e3f2fd;
}

.canvas-container {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
  background: #f8f9fa;
}

.canvas {
  min-height: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 20px;
}

.empty-canvas {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #9e9e9e;
  text-align: center;
}

.empty-canvas i {
  font-size: 48px;
  margin-bottom: 15px;
}

.empty-canvas p {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.empty-canvas span {
  font-size: 0.9rem;
}

// 容器拖拽排序样式
.containers-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 50px;
}

.container-drag-item {
  position: relative;
  transition: all 0.2s ease;
}

.container-drag-item.cdk-drag-preview {
  opacity: 0.8;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  transform: rotate(2deg);
}

.container-drag-item.cdk-drag-placeholder {
  opacity: 0.3;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 8px;
  min-height: 100px;
}

.container-drag-item.cdk-drag-animating {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

.drag-handle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  cursor: move;
  color: #757575;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.container-drag-item:hover .drag-handle {
  opacity: 1;
}

.drag-handle:hover {
  color: #3f51b5;
  background: rgba(227, 242, 253, 0.9);
}

.containers-list.cdk-drop-list-dragging .container-drag-item:not(.cdk-drag-placeholder) {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

// 响应式设计
@media (max-width: 1200px) {
  .components-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: 40vh;
  }

  .toolbar {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
